﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AnalysisFinaceType.aspx.cs" Inherits="AnalysisFinaceType" Theme="DefaultSkin" %>
<%@ Register src="Navigate.ascx" tagname="Navigate" tagprefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>财务分析</title>
    <script type="text/javascript" src="Include/Visifire/Visifire2.js"></script>
    <script src="JS/My97DatePicker/WdatePicker.js"></script>
    <script src="JS/Function.js"></script>
</head>
<body  style="text-align:center">
    <form id="form1" runat="server">
    
    <uc1:Navigate ID="Navigate1" runat="server" />
    
    <div style="width:980px">
    
        <div style="width:200px;float:left;text-align:left;margin-top:20px;">
            <ul>
                <li style="line-height:30px">
                    <a href="AnalysisFinaceType.aspx?TypeID=2">支出分析</a>
                </li>
                <li  style="line-height:30px">
                    <a href="AnalysisFinaceType.aspx?TypeID=3">收入分析</a>
                </li>
            </ul>
        </div>
        
        <div  style="margin-top:20px;">
            <table cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td width="70px">开始日期</td>
                <td><asp:TextBox ID="txtStartTime" runat="server" onfocus="ShowCal();"></asp:TextBox></td>
                <td width="70px">结束日期</td>
                <td><asp:TextBox ID="txtEndTime" runat="server"  onfocus="ShowCal();"></asp:TextBox></td>
                <td width="100px">
                    <input type="button" class="buttonblue4" value="查 询" onclick="SetUrl();" />
                </td>
            </tr>
            </table>
        </div>
        
        <div id="VisifireChart0" style="margin-top:20px;float:left;" >

            <script type="text/javascript" >
                
                function SetUrl()
                {
                    var url = 'AnalysisFinaceType.aspx?TypeID=<%=Request.QueryString["TypeID"]%>';
                    url+= "&StartDate=" + escape(document.getElementById('txtStartTime').value);
                    url+= "&EndDate=" + escape(document.getElementById('txtEndTime').value);
                    
                    location.href= url;
                }
                
                function DrawPic()
                {
                
                    // Create Visifire object
                    var vChart = new Visifire2('Include/Visifire/SL.Visifire.Charts.xap', "MyChart", 750, 300);
                    
                    var url = 'AnalysisFinaceType.ashx?TypeID=<%=Request.QueryString["TypeID"]%>';
                    url+= '&StartDate=<%=Request.QueryString["StartDate"]%>';
                    url+= '&EndDate=<%=Request.QueryString["EndDate"]%>';
                    // vChart1.setLogLevel(0); // If you want to disable logging.
                   
                    // Set Chart Data XML
                    
                    
                    vChart.setDataUri(url);

                    // Render chart
                    vChart.render("VisifireChart0");
                }
                
                DrawPic();
            </script>
            
        </div>
        
       <div id="divBack" runat="server" style="width:100%;margin-top:50px;text-align:center;padding-left:80px">
               <a href="#" onclick="history.back();">返 回</a>
       </div>
       
    </div>
    </form>
</body>
</html>
